package com.cn.jdia.tas.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jdia.tas.dao.T_attrecordMapper;
import com.cn.jdia.tas.model.T_attrecord;
import com.cn.jdia.tas.service.IAttrecordService;

@Service("attrecordService")
public class IAttrecordServiceImpl implements IAttrecordService {

	@Resource
	private T_attrecordMapper attrecordDao;

	@Override
	public List<T_attrecord> getAttrecordsByDate(String start, String end) {
		return this.attrecordDao.getAttrecords(start, end);
	}

	@Override
	public List<T_attrecord> getAttrecordsByDate2(String start, String end) {
		return this.attrecordDao.getAttrecordsWithName(start, end);
	}

	@Override
	public List<T_attrecord> getDetailAttrecords(String id, String start, String end) {
		return this.attrecordDao.getpersonDetailRecord(id, start, end);
	}

	@Override
	public List<T_attrecord> getDeptAttrecords(String deptid, String date) {
		return this.attrecordDao.selectdeptrcd(deptid, date);
	}

	@Override
	public List<T_attrecord> getInterestAttrecords(String date, List<String> interestList) {
		return this.attrecordDao.queryInterestRecord(date, interestList);
	}

	@Override
	public int getCheckedCountByDay(String date) {
		return this.attrecordDao.queryCountByDay(date);
	}

	@Override
	public int getLateCount(String date) {
		return this.attrecordDao.queryLateCount(date);
	}

	@Override
	public int getMaxRecordId() {
		return this.attrecordDao.queryMaxAttrecordId();
	}

	@Override
	public int addSelective(T_attrecord record) {
		return this.attrecordDao.insertSelective(record);
	}

	@Override
	public List<T_attrecord> getGroupRecord(String date, List<String> groupList) {
		return this.attrecordDao.selectGroupRecord(date, groupList);
	}

	@Override
	public List<T_attrecord> getParentDeptRcd(String deptid, String date) {
		return this.attrecordDao.selectParentdeptRcd(deptid, date);
	}

	@Override
	public List<Map<String, Object>> querydLevel2DeptCount(String deptid, String date) {
		return this.attrecordDao.querydLevel2DeptCount(deptid, date);
	}

	@Override
	public List<Map<String, Object>> getFullLevel2DeptCount(String deptid, String date) {
		return this.attrecordDao.querydFullLevel2DeptCount(deptid, date);
	}

	@Override
	public List<T_attrecord> getFullDeptRcd(String deptid, String date) {
		return this.attrecordDao.selectFullDeptRcd(deptid, date);
	}

	@Override
	public List<T_attrecord> getParentDeptLateRecord(String date, String deptid) {
		return this.attrecordDao.selectParentDeptLateRecord(date, deptid);
	}

	@Override
	public List<T_attrecord> getChildDeptLateRecord(String date, String deptid) {
		return this.attrecordDao.selectChildDeptLateRecord(date, deptid);
	}

	@Override
	public int getParentOutcheckMemberCount(String date, String deptid) {
		return this.attrecordDao.selectParentOutcheckMemberCount(date, deptid);
	}

	@Override
	public List<T_attrecord> getParentOutcheckRecord(String date, String deptid) {
		return this.attrecordDao.selectParentOutcheckRecord(date, deptid);
	}

	@Override
	public List<T_attrecord> getParentDepetMutilRecords(String deptid, String start, String end) {
		return this.attrecordDao.selectParentDepetMutilRecords(deptid,start, end);
	}

	@Override
	public List<T_attrecord> getChildDepetMutilRecords(String deptid, String start, String end) {
		return this.attrecordDao.selectChildDepetMutilRecords(deptid,start, end);
	}

}
